#include <header.h>

int main(){

    while(1){
        int file_fd = open("1.txt", O_WRONLY);
        char buf[100] = {0};
        ssize_t ret = read(STDIN_FILENO, buf, sizeof(buf) );
        write(file_fd, &ret, sizeof(ret));
        write(file_fd, buf, ret);
        close(file_fd);
    }
    return 0;
}

